import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
// import Layout from '@/layout'

// 公共路由
export const constantRoutes = [
  {
    path: '/',
    hidden: true,
    component: (resolve) => require(['@/views/tool/gen'], resolve),
  },
  {
    hidden: true,
    path: '/gen/edit/:tableId(\\d+)',
    component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
    name: 'GenEdit',
    meta: { title: '修改生成配置' }
  }
]

export default new Router({
  mode: 'history', // 去掉url中的#
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})